Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.1K
Visualizações
"ERROR in getInternalNameOfClass() called on a non-ES5 class: expected AngularFireModule to have an inner class declaration"
Terminal -

    "WARNING in Invalid constructor parameter decorator in D:/New folder/SilverLife/node_modules/@angular/fire/fesm2015/angular-fire.js:
     () => [
        { type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
    ]
    
    ERROR in getInternalNameOfClass() called on a non-ES5 class: expected
    AngularFireModule to have an inner class declaration"

I am facing this issue while integrating Angular firebase in my Angular 9 project. My application's package.json

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

Try changing target in the compilerOptions of your tsconfig.json from es5 to es2015

over 4 years ago · Santiago Trujillo Relatório

0

I encountered same issue during migration from Angular8 to Angular9.

In Angular9 they introduced new generation compilation and rendering pipeline called Angular Ivy. The documentation says:

Ivy applications can be built with libraries that were created with the View Engine compiler. This compatibility is provided by a tool known as the Angular compatibility compiler (ngcc). CLI commands run ngcc as needed when performing an Angular build.

Source: https://angular.io/guide/ivy

So in order to project with "target": "es5" work, after using npm install you have to run ngcc.

You can add it in your package.json file:

{
  "scripts": {
    "postinstall": "ngcc"
  }
}

Then it should run automaticly after running npm install.

over 4 years ago · Santiago Trujillo Relatório

0

I had to use the following in tsconfig.json:

  "angularCompilerOptions": {
    "enableIvy": false,
  }

Not ideal but it worked.

Adding

  "scripts": {
    "postinstall": "ngcc"
  }

to package.json and changing target to es2015 in tsconfig.json didn't work - probably some other setting(s) messing with them.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda